select A.FK_SOCIETE, FK_ETABLISSEMENT,a.fk_centralisateur, A.FK_COMPTE , A.FK_AXE0 , A.FK_AXE1 , A.FK_AXE2 , A.FK_AXE3 , A.FK_AXE4 ,  A.FK_AXE5 ,  A.FK_AXE6 ,  A.FK_AXE7 ,  A.FK_AXE8 ,A.FK_AXE9  , A.FK_RUBRIQUE , CASE when SENS = '1' then sum(MONTANT_ANA_MONNAIE1*SENS) else 0 end as SOLDE_DEBIT_MONNAIE1, 
 CASE when SENS = '-1' then sum(MONTANT_ANA_MONNAIE1*(-SENS)) else 0 end as SOLDE_CREDIT_MONNAIE1, zppcg151
 FROM FI_GEN_ECRITURE_ANALYTIQUE A, FI_GEN_PLAN_COMPTABLE B 
 WHERE A.FK_SOCIETE = 'SVB'
  and DATE_COMPTABLE between to_date('20160301','yyyymmdd') and  to_date('20160331','yyyymmdd')
  and (fK_classe_ecriture is null or fk_classe_ecriture<>'IFRS')      
and FK_CENTRALISATEUR = UK_NUMERO_COMPTE
and CODE_PARAM_CODE = 'CSVB'
and zppcg151 is not null and zppcg151 <> 'INV'
and substr(fk_centralisateur,1,1) between '6' and '7'
group by A.FK_SOCIETE , A.FK_eTABLISSEMENT, zppcg151, A.FK_COMPTE , A.FK_AXE0 ,  A.FK_AXE1 , A.FK_AXE2 , A.FK_AXE3 , A.FK_AXE4 ,  A.FK_AXE5 ,  A.FK_AXE6 ,  A.FK_AXE7 ,  A.FK_AXE8, A.FK_AXE9 , A.FK_RUBRIQUE , '20160301','20160331',SENS ,fk_centralisateur